import React from 'react';
import classNames from 'classnames';
import { Link, History } from 'react-router';

import {
  Panel
} from 'react-bootstrap';

import * as Apis from '../config/Apis';

class MessageSys extends React.Component {

  constructor() {
    super();
  }

  static propTypes = {
      
  }
  
  render(){

      let { message } = this.props;

      return (
            message.title && message.title.length > 0 && message.pic && message.pic.length > 0?
            <Panel className="message-item message-sys">
               <h5 className="text-primary">{message.title}</h5>
               <img src={message.pic} className="img-responsive"/>
               <p className="text-muted">
                 { message.descr }
               </p>
               <div className="text-right">
                <Link to={`/MessageDetail`} query={{id:message.id}}>
                    <small>查看全文</small>
                </Link>               
              </div>
            </Panel>
            :
            null
      );
  }
}

export default MessageSys;